Date: Tue, 05 Nov 1996 00:33:43 GMT
Server: NCSA/1.5
Content-type: text/html
Last-modified: Wed, 28 Aug 1996 06:06:35 GMT
Content-length: 4144

<HTML>
<HEAD>
<TITLE>CS 302: Tsao: Disk Organization (Using Subdirectories)</TITLE>
</HEAD>
<BODY>
<H1>CS 302 Sections 33 &amp 43: Disk Organization (Using Subdirectories)</H1>
<HR>
<P>
In order to keep your disk space organized, you may want to use  
<EM>subdirectories</EM>.  In your <B>U:</B> drive, you already have some
subdirectories, namely <B>windows</B> and <B>email</B>.  To create new
subdirectories, you should use the <B><EM>File Manager</EM></B>:<P>
<OL>
<LI>Start the <B><EM>File Manager</EM></B> by double-clicking on its icon (in
the <B>Main</B> program group).
<LI>Only one window needs to be used in the <EM>File Manager</EM>.  In this
window, select the <B>U:</B> drive from the drive list, and choose the root
directory ("<B>u:\</B>") in the directory tree.  The file list will contain
a list of all of the files and subdirectories in the root directory.
<LI>Now, click on the <B><U>F</U>ile</B> menu and select the <B>Cr<U>e</U>ate
Directory...</B> option.  (Click <!WA0><!WA0><!WA0><!WA0><A HREF="http://www.cs.wisc.edu/~cs302/newdir.gif">here</A> to view what
the <EM>File Manager</EM> will look like.)
<LI>This will cause a dialog to appear.  In this dialog, type in the name of 
the subdirectory you want to create.  (A subdirectory's name follows the same
constraints as a file name.  In general, the extension is not used, thus 
allowing 8 characters.)  If you want to organize your programs, a good choice
for the subdirectory's name is <B><EM>progXXXX</EM></B>, where 
<B><EM>XXXX</EM></B> is the number of the program.  (For example, 
<B><EM>prog0001</EM></B>, <B><EM>prog0001</EM></B>, etc.)
<LI>In order to use this subdirectory, you can select it when creating a new
project.  For example, suppose a subdirectory <B>prog0003</B> was made.  When
creating the project for Program #3, use this subdirectory when filling in the
<B><U>P</U>roject Path and Name:</B> field:<P>
<!WA1><!WA1><!WA1><!WA1><IMG SRC="http://www.cs.wisc.edu/~cs302/proj.subdir.gif"><P>
Your source code file, object module, and executable file will automatically 
be placed within the <B>prog0003</B> subdirectory.
</OL>
<P>
If you already have made a program but want to move it to a newly created
subdirectory, use should use the <EM>File Manager</EM> to move the files:
<UL>
<LI>First, create a new subdirectory using the first 3 steps above.
<LI>Next, in the <EM>File Manager</EM>, open up two windows.  The top window
should be set up to be the source directory (i.e., the drive and directory
where the files to be moved currently reside), and the bottom window should 
be set to the newly created subdirectory (also called the destination 
directory).
<LI>Select all of the files that you want to move from the file list in the
source directory.  Drag the files from the source directory window's file
list to the destination directory window's file list.  (Note: if the source
and destination drives are the same, this will <B>move</B> the files.  If
the drives are different, the files will be <B>copied</B>.)
</UL>
<P>
For example, suppose you wanted to move a project named <B>prog003</B> from
the root directory to the subdirectory <B>prog0003</B>.  All of the files
that need to be moved have file names starting with <B>prog003</B>, but have
different extensions.  The files associated with a project have the extensions:
<P>
<UL>
<LI>[.cpp] - the source code file
<LI>[.h] - the header file
<LI>[.obj] - the object module
<LI>[.csm] - the precompiled headers
<LI>[.ide] - the project file
<LI>[.exe] - the executable program
<LI>[.rc] - resource file
<LI>[.res] - resource script
<LI>[.~de] - a backup of the project file
<LI>[.obr] - other stuff
<LI>[.dsw] - other stuff
<LI>[.rws] - other stuff
</UL>
<P>
Not all of these files may exist.  It depends upon how far you have gotten 
in writing a program, and what kind of program you are writing.  (In general,
the only files which <B>need</B> to be moved are the source code file, the
header file (if it exists), and the project file.  The other files may be
deleted.)
<BR>
<HR>
<P>
Back to: <!WA2><!WA2><!WA2><!WA2><A HREF="http://www.cs.wisc.edu/~cs302/cs302.html"><EM>CS 302 Home
Page</EM></A>
<P>
Back to: <!WA3><!WA3><!WA3><!WA3><A HREF="http://www.cs.wisc.edu/~tsao/cs302.html"><EM>CS 302: Tsao
</EM></A>
</BODY>
</HTML>




